package org.apache.catalina.startup;

import java.net.URL;
import java.net.URLClassLoader;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

/**
 * ClassLoaderFactory
 *
 * @author chentudong
 * @date 2024/2/19 19:55
 * @since 1.0
 */
public class ClassLoaderFactory {
  public static ClassLoader createClassLoader(List<Repository> repositories,
      final ClassLoader parent){
    return  new URLClassLoader(new URL[0]);
  }

  public static class Repository {
    private final String location;
    private final RepositoryType type;

    public Repository(String location, RepositoryType type) {
      this.location = location;
      this.type = type;
    }

    public String getLocation() {
      return location;
    }

    public RepositoryType getType() {
      return type;
    }
  }

  public enum RepositoryType {
    DIR,
    JAR
  }
}
